{% extends "base.html" %} {% block title %}优惠券列表{% end %}

{% block head %}
    <script id="scriptInit" type="text/javascript">
        $(document).ready(function () {
            $("#demo-dom").wijgrid();
    });
    </script>
{% end %}

{% block content %}

    <table id="demo-dom">
        <thead>
            <tr>
                <th>优惠券名称</th>
                <th>截至日期</th>
                <th>面额</th>
                <th>发放数量</th>
                <th>操作</th>
            </tr>
        </thead>

        <tbody>
            {% for c in coupons %}
            <tr>
                <td>{{ c['name'] }}</td>
                <td>{{ c['valid'] }}</td>
                <td>{{ c['amount'] }}</td>
                <td>{{ c['number'] }}</td>
                <td><a href="/coupon/view/{{ c['uid'] }}/">查看</a></td>
            </tr>
            {% end %}
        </tbody>
    </table>


{% end %}